package com.provider;

import com.common.service.UserService;
import com.provider.service.impl.UserServiceImp;
import com.rpc.RpcApplication;
import com.rpc.config.RpcConfig;
import com.rpc.registry.LocalRegistry;
import com.rpc.server.HttpServer;
import com.rpc.server.VertxHttpServer;
import com.rpc.utils.ConfigUtils;

/**
 * 简易服务提供者实例
 */
public class EasyProviderExample {
    public static void main(String[] args) {

//        RpcConfig rpcConfig = ConfigUtils.loadConfig(RpcConfig.class, "rpc");
        //RPC框架初始化
        RpcApplication.init();
        //注册服务
        LocalRegistry.register(UserService.class.getName(), UserServiceImp.class);
        //启动Web服务
        HttpServer httpServer = new VertxHttpServer();
        httpServer.doStart(8080);
    }
}
